package org.halk.controller;

import org.halk.servie.UserTestService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.concurrent.ExecutionException;

@RestController
@RequestMapping("/rollback")
public class RollbackTestController {


    @Resource
    private UserTestService userTestService;


    @GetMapping("/update/{id}")
    public String get(@PathVariable String id) throws ExecutionException, InterruptedException {
        userTestService.updateId(id);
        return "111";
    }
}
